#ifndef DW_GRAPHICS_RENDER_TARGET_INL
#	define DW_GRAPHICS_RENDER_TARGET_INL

namespace dw {
	namespace graphics {

//------------------------------------------------------------------------------
// Construction & Destruction
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
inline RenderTarget::RenderTarget()
:	m_clearMode(DefaultClearMode)
,	m_clearColor(DefaultClearColor)
,	m_clearDepth(DefaultClearDepth)
,	m_clearStencil(DefaultClearStencil)
{
}

//------------------------------------------------------------------------------
// Setup
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
inline void RenderTarget::setClearMode(dw::uint32 mode)
{
	dwAssert(mode <= ALL, "Invalid clear mode");

	m_clearMode = mode;
}

//------------------------------------------------------------------------------
inline void RenderTarget::setClearColor(const Colorf& color)
{
	dwAssert(color.r >= 0.0f && color.r <= 1.0f, "Invalid parameter: color is out of range");
	dwAssert(color.g >= 0.0f && color.g <= 1.0f, "Invalid parameter: color is out of range");
	dwAssert(color.b >= 0.0f && color.b <= 1.0f, "Invalid parameter: color is out of range");
	dwAssert(color.a >= 0.0f && color.a <= 1.0f, "Invalid parameter: color is out of range");

	m_clearColor = color;
}

//------------------------------------------------------------------------------
inline void RenderTarget::setClearDepth(float32 depth)
{
	dwAssert(depth >= 0.0f && depth <= 1.0f, "Invalid parameter: depth is out of range");

	m_clearDepth = depth;
}

//------------------------------------------------------------------------------
inline void RenderTarget::setClearStencil(int32 stencil)
{
	m_clearStencil = stencil;
}

//------------------------------------------------------------------------------
// State
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
inline uint RenderTarget::getClearMode() const
{
	return m_clearMode;
}

//------------------------------------------------------------------------------
inline const Colorf& RenderTarget::getClearColor() const
{
	return m_clearColor;
}

//------------------------------------------------------------------------------
inline float32 RenderTarget::getClearDepth() const
{
	return m_clearDepth;
}

//------------------------------------------------------------------------------
inline int32 RenderTarget::getClearStencil() const
{
	return m_clearStencil;
}

	} // namespace graphics
} // namespace dw

#endif // !DW_GRAPHICS_RENDER_TARGET_INL
